from pms.common.views import PostFormula
from department.models import DepartmentRole
from department.utils.role import department_role_view


class API(PostFormula):

    def handle(self, req):
        rid = req['rid']
        return self.success_respond(
            department_role_view(
                DepartmentRole.objects.get(id=rid)
            )
        )
